import { E_HTTP_METHODS, IURL } from '../transfer-typing'

export interface ICourseURL {
  createCourse: IURL
  updateCourse: IURL
  setCoursePlayback: IURL
  updateCourseStatus: IURL
  getCourseInfo: IURL
  addCourseUser: IURL
  listCourseUser: IURL
  acceptCourseUser: IURL
}

export function createCourseURL(): ICourseURL {
  return {
    createCourse: {
      url: 'courseserver/api/createCourse',
      method: E_HTTP_METHODS.POST
    },
    updateCourse: {
      url: 'courseserver/api/updateCourse',
      method: E_HTTP_METHODS.POST
    },
    setCoursePlayback: {
      url: 'courseserver/api/updateCoursePlayback',
      method: E_HTTP_METHODS.POST
    },
    updateCourseStatus: {
      url: 'courseserver/api/updateCourseStatus',
      method: E_HTTP_METHODS.POST
    },
    getCourseInfo: {
      url: 'courseserver/api/getCourse',
      method: E_HTTP_METHODS.POST
    },
    addCourseUser: {
      url: 'courseserver/api/addCourseUser',
      method: E_HTTP_METHODS.POST
    },
    listCourseUser: {
      url: 'courseserver/api/listCourseUser',
      method: E_HTTP_METHODS.POST
    },
    acceptCourseUser: {
      url: 'courseserver/api/acceptCourseUser',
      method: E_HTTP_METHODS.POST
    }
  }
}
